package cn.qf.shop.service.impl;

import cn.qf.shop.mapper.PetsMapper;
import cn.qf.shop.pojo.entity.Pets;
import cn.qf.shop.pojo.qo.PetsQo;
import cn.qf.shop.service.PetsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;
@Service
public class PetsServiceImpl implements PetsService {
    @Autowired
    private PetsMapper petsMapper;
    @Override
    public List<Pets> selectAll() {
        List<Pets> pets = petsMapper.selectAll();
        return pets;
    }

    @Override
    public List<Pets> selectByKeyWord(PetsQo petsQo) {
        List<Pets> pets = petsMapper.selectByKeyWord(petsQo);
        return pets;
    }

    @Override
    public int updateByPetsIds(Set<Integer> petsIds) {
        int i = petsMapper.updateByPetsIds(petsIds);
        return i;
    }

    @Override
    public int AddPets(PetsQo petsQo) {
        int i = petsMapper.AddPets(petsQo);
        return i;
    }

    @Override
    public int updateByOnclick(PetsQo petsQo) {
        int i = petsMapper.updateByOnclick(petsQo);
        return i;
    }

    @Override
    public int updateByPetsId(PetsQo petsQo) {
        int i = petsMapper.updateByPetsId(petsQo);
        return i;
    }
}
